CC=/usr/local/bin/arm-apple-darwin-gcc
CFLAGS=-fsigned-char -g -ObjC -Wall -Wundeclared-selector -fobjc-exceptions -Wreturn-type -Wnested-externs -Wredundant-decls -Wbad-function-cast \
	-Wchar-subscripts -Winline -Wswitch -Wshadow -Wcast-qual
CPPFLAGS=
LD=$(CC)
LDFLAGS=-lobjc -L$(HEAVENLY)/usr/lib -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -framework GraphicsServices

all:	LifeCounter

LifeCounter:	main.o LifeCounterApp.o LifeCounterCell.o LifeCounterGame.o LifeCounterToolbar.o ThemeManager.o
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

package: LifeCounter
	rm -fr LifeCounter.app
	mkdir -p LifeCounter.app
	cp LifeCounter LifeCounter.app/LifeCounter
	cp Info.plist LifeCounter.app/Info.plist
	cp *.png LifeCounter.app/
	

clean:
	rm -rf *.o LifeCounter LifeCounter.app
